/*    */ package com.fizz.redpacket.config;

/*    */
/*    */ import org.springframework.boot.autoconfigure.AutoConfigureAfter;
/*    */ import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
/*    */ import org.springframework.context.annotation.Bean;
/*    */ import org.springframework.context.annotation.Configuration;
/*    */ import org.springframework.data.redis.connection.RedisConnectionFactory;
/*    */ import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
/*    */ import org.springframework.data.redis.core.RedisTemplate;
/*    */ import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer;
/*    */ import org.springframework.data.redis.serializer.RedisSerializer;
/*    */ import org.springframework.data.redis.serializer.StringRedisSerializer;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ @Configuration
/*    */ @AutoConfigureAfter({RedisAutoConfiguration.class})
/*    */ public class RedisConfig
/*    */ {
/*    */   @Bean
/*    */   public RedisTemplate<String, Object> redisCacheTemplate(LettuceConnectionFactory redisConnectionFactory) {
/* 25 */     RedisTemplate<String, Object> template = new RedisTemplate();
/* 26 */     template.setKeySerializer((RedisSerializer)new StringRedisSerializer());
/* 27 */     template.setValueSerializer((RedisSerializer)new GenericJackson2JsonRedisSerializer());
/* 28 */     template.setConnectionFactory((RedisConnectionFactory)redisConnectionFactory);
/* 29 */     return template;
/*    */   }
/*    */ }


/* Location:              /home/fizz/Music/大学学习的知识总结/收获比较大的项目/redpacket/redpacket/src/main/docker8081/redpacket-0.0.1-SNAPSHOT.jar!/BOOT-INF/classes/com/fizz/redpacket/config/RedisConfig.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */